package com.ssd.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 优惠券活动表
 * </p>
 *
 * @author author
 * @since 2024-11-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("activity")
@ApiModel(value="Activity对象", description="优惠券活动表")
public class Activity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "活动id")
    @TableId(value = "id", type = IdType.NONE)
    private Long id;

    @ApiModelProperty(value = "活动名称")
    private String name;

    @ApiModelProperty(value = "优惠券类型，1：满减，2：折扣")
    private Integer type;

    @ApiModelProperty(value = "使用条件，0：表示无门槛，其他值：最低消费金额")
    private BigDecimal amountCondition;

    @ApiModelProperty(value = "折扣率，折扣类型的折扣率，8折就是存80")
    private Integer discountRate;

    @ApiModelProperty(value = "优惠金额，满减或无门槛的优惠金额")
    private BigDecimal discountAmount;

    @ApiModelProperty(value = "优惠券有效期天数，0：表示有效期是指定有效期的")
    private Integer validityDays;

    @ApiModelProperty(value = "发放开始时间")
    private LocalDateTime distributeStartTime;

    @ApiModelProperty(value = "发放结束时间")
    private LocalDateTime distributeEndTime;

    @ApiModelProperty(value = "活动状态，1：待生效，2：进行中，3：已失效 4：作废")
    private Integer status;

    @ApiModelProperty(value = "发放数量，0：表示无限量，其他正数表示最大发放量")
    private Integer totalNum;

    @ApiModelProperty(value = "库存")
    private Integer stockNum;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

}
